<#include "/includes/vars.inc"> 
<@pp.dropOutputFile />
<#assign fileName = "${javaDir}${packageDir}/service/support/GenericService.java">
<#if !pp.outputFileExists(fileName)>
	<@pp.changeOutputFile name="${fileName}" />

package ${project.@rootPackage}.service.support;

import ${project.@rootPackage}.dao.support.GenericDao;
import java.util.List;

/**
 * Interface GenericService
 * <#if project.@author[0]??>@author ${project.@author}</#if>
 */
public interface GenericService<T> {
    public abstract GenericDao<T> getDao();
    public boolean create(T entity);
    public boolean delete(T entity) ;
    public boolean update(T entity);
    public T findById(Long id);
    public List<T> findAll();
    public boolean create(Iterable<T> entities);
    public boolean delete(Iterable<T> entities) ;
    public boolean update(Iterable<T> entities);
    //public List<T> findAll(int firstResult, int maxResults);
    //public void clear();
    //public void flush();
}
</#if>